package com.gehj.base;

import android.util.Log;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;

public class BaseActivityObserver implements LifecycleObserver {

    private final String TAG = this.getClass().getName();

    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    public  void onCreate() {
        Log.d(TAG,"Lifecycle.Event.ON_CREATE");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    public  void onStart() {
        Log.d(TAG,"Lifecycle.Event.ON_START");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
    public  void onPause() {
        Log.d(TAG,"Lifecycle.Event.ON_PAUSE");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    public  void onResume() {
        Log.d(TAG,"Lifecycle.Event.ON_RESUME");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    public  void onStop() {
        Log.d(TAG,"Lifecycle.Event.ON_STOP");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    public  void onDestroy() {
        Log.d(TAG,"Lifecycle.Event.ON_DESTROY");
    }

   /* @OnLifecycleEvent(Lifecycle.Event.ON_ANY)
    public  void onANY() {
        Log.d(TAG,"Lifecycle.Event.ON_ANY");
    }*/
}
